The L2 page and already shadowed L1 page may be out of sync.
This fixes the problems of segmentation faults and strange prints
when booting Redhat FC3 and make kernel in FC3 in VMX domain.
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
#elif CONFIG_PAGING_LEVELS == 4
smfn = shadow_l4_table(d, gpfn, gmfn);
#endif
- }
+ }else
+ shadow_sync_all(d);
if ( !get_shadow_ref(smfn) )
BUG();
old_smfn = pagetable_get_pfn(v->arch.shadow_table);
*/
if ( unlikely(!(smfn = __shadow_status(d, gpfn, PGT_base_page_table))) )
smfn = shadow_l2_table(d, gpfn, gmfn);
+ else
+ shadow_sync_all(d);
if ( !get_shadow_ref(smfn) )
BUG();
old_smfn = pagetable_get_pfn(v->arch.shadow_table);